from flask import Flask

from apis import init_api
from ext import init_ext
from middleware import load_middleware
from config import Config


# from settings import envs
# from views import init_view

def create_app(env):
    app = Flask(__name__)
    # app.config.from_object(envs.get(env))
    app.config.from_object(Config)
    init_ext(app)
    # init_view(app=app)
    init_api(app=app)
    load_middleware(app)
    return app


if __name__ == '__main__':
    # app.run(debug=True)
    create_app('t')
